package times

import (
	"time"
)

const (
	halfMilliSecond = int(time.Millisecond / 2)
)

func GetMilliSecond(t time.Time) int {
	nano := t.Nanosecond()
	nano += halfMilliSecond
	milli := nano / int(time.Millisecond)

	return milli
}
